package c1761;

import java.util.Scanner;

public class A {
    static class Complex {
        int real;
        int image;

        public Complex(int real, int image) {
            this.real = real;
            this.image = image;
        }

        public Complex() {
            this(0, 0);
        }

        @Override
        public String toString() {
            return String.format("%d+%di", real, image);
        }

        public Complex add(Complex that) {
            Complex ans = new Complex();
            ans.real = this.real + that.real;
            ans.image = this.image + that.image;
            return ans;
        }
    }

    public static void main(String[] args) {
        Scanner cin = new Scanner(System.in);
        int n = cin.nextInt();
        Complex sum = new Complex();
        for (int i = 0; i < n; i++) {
            int real = cin.nextInt();
            int image = cin.nextInt();
            sum = sum.add(new Complex(real, image));
        }
        System.out.println(sum);
    }
}
